﻿<phone:PhoneApplicationPage 
    x:Class="STEM123.CreateContentVideo"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="480"
    shell:SystemTray.IsVisible="True">

    <!--LayoutRoot is the root grid where all page content is placed-->
    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot">
        <Grid.RowDefinitions>
        	<RowDefinition Height="Auto"/>
        	<RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!--TitlePanel contains the name of the application and page title-->
        <StackPanel x:Name="TitlePanel" Grid.Row="0">
            <TextBlock x:Name="ApplicationTitle" Text="STEM123" Style="{StaticResource PhoneTextNormalStyle}"/>
            <TextBlock x:Name="PageTitle" Text="Answer using video" Style="{StaticResource PhoneTextTitle1Style}" FontSize="48"/>
        </StackPanel>

        <!--ContentPanel - place additional content here-->
        <Grid x:Name="ContentPanel" Grid.Row="1" Background="Transparent">
            <!--Camera viewfinder>-->
            <Rectangle x:Name="viewfinderRectangle" Width="370" Height="270" HorizontalAlignment="Center" Grid.RowSpan="2" VerticalAlignment="Center" />
            <MediaElement x:Name="VideoPlayer" Width="370" Height="270" AutoPlay="True" RenderTransformOrigin="0.5,0.5" Stretch="Fill" Canvas.Left="50" Canvas.Top="130" VerticalAlignment="Center" HorizontalAlignment="Center" />
            <TextBlock Height="30" HorizontalAlignment="Right" Name="txtblockSlide" Text="Slide Counter" VerticalAlignment="Top" />
            <TextBlock Height="36" HorizontalAlignment="Left" Name="txtblockTerm" Text="Term" VerticalAlignment="Top" Width="456" Margin="0,25,0,0" FontSize="24" FontWeight="Bold" />
            <TextBlock Height="108" HorizontalAlignment="Left" Name="txtblockQuestion" Text="Question" VerticalAlignment="Top" Width="456" Margin="0,55,0,0" FontSize="24" />
            <!--Used for debugging >-->
            <TextBlock Height="40" HorizontalAlignment="Left" Name="txtDebug" VerticalAlignment="Top" Width="440" FontSize="24" FontWeight="ExtraBold" Canvas.Left="12" Canvas.Top="500" Margin="16,158,0,0" />
            <!--<Button Content="record" Height="95" HorizontalAlignment="Left" Margin="62,431,0,0" Name="recordButton" VerticalAlignment="Top" Width="160" BorderThickness="0" Click="recordButton_Click" Grid.Row="1" />
        	<Button Content="play" Height="95" HorizontalAlignment="Left" Margin="252,431,0,0" Name="playpauseButton" VerticalAlignment="Top" Width="160" BorderThickness="0" Click="playpauseButton_Click" Grid.Row="1" />-->
		</Grid>
        <Grid.Background>
            <ImageBrush ImageSource="/STEM123;component/STEMBackground.png" Stretch="None" />
        </Grid.Background>
    </Grid>
 
    <!--Sample code showing usage of ApplicationBar-->
        <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True" x:Name="PhoneAppBar" Opacity="0.0">
            <shell:ApplicationBarIconButton IconUri="/Images/appbar.feature.video.rest.png" Text="record"  x:Name="StartRecording" Click="StartRecording_Click" />
            <shell:ApplicationBarIconButton IconUri="/Images/appbar.stop.rest.png" Text="stop" x:Name="StopPlaybackRecording" Click="StopPlaybackRecording_Click"/>
            <shell:ApplicationBarIconButton IconUri="/Images/appbar.transport.play.rest.png" Text="play" x:Name="StartPlayback" Click="StartPlayback_Click"  />
            <shell:ApplicationBarIconButton IconUri="/Images/appbar.transport.pause.rest.png" Text="pause" x:Name="PausePlayback" Click="PausePlayback_Click"/>
            <shell:ApplicationBar.MenuItems>
                <shell:ApplicationBarMenuItem Text="save" Click="SaveContent" />
                <shell:ApplicationBarMenuItem Text="cancel" Click="CancelContent"/>
            </shell:ApplicationBar.MenuItems>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>

</phone:PhoneApplicationPage>
